﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BCS.Business;

namespace BCS.WinFormAppGui
{
        public partial class CameraCountForm : Form
        {
                private BusinessCache cache = BusinessCache.Instance;

                public CameraCountForm()
                {
                        InitializeComponent();
                }

                private void Form_Load(object sender, EventArgs e)
                {
                        for (int i = 1; i < 6; i++)
                        {
                                CameraCountComboBox.Items.Add(i);
                        }

                        CameraCountComboBox.SelectedItem = cache.Camera.Count;
                }

                private void YesButton_Click(object sender, EventArgs e)
                {
                        cache.Camera.Count = Convert.ToInt32(CameraCountComboBox.SelectedItem.ToString());
                        cache.Save();

                        Close();
                }
        }
}
